import math

def calculate_perimeter(a, b, c):
    """计算三角形的周长"""
    return a + b + c

def calculate_area(a, b, c):
    """计算三角形的面积（使用海伦公式）"""
    s = (a + b + c) / 2
    area = math.sqrt(s * (s - a) * (s - b) * (s - c))
    return area

# 示例输入
a = float(input())
b = float(input())
c = float(input())

# 检查输入是否能构成三角形
if a + b > c and a + c > b and b + c > a:
    perimeter = calculate_perimeter(a, b, c)
    area = calculate_area(a, b, c)
    print(f"{perimeter:.2f}")
    print(f"{area:.2f}")
else:
    print("输入的边长不能构成三角形")